import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: ()=>import('@/views/home.vue'),
      children: [
        {
          path: '/',
          name: 'welcome',
          component: ()=>import('@/views/welcome.vue'),
        },
        {
          path: 'material-category',
          name: 'material-category',
          component: ()=>import('@/views/material-category/index.vue'),
        },
          {
            path: 'material',
            name: 'material',
            component: ()=>import('@/views/material/index.vue'),
          },
          {
            path: 'user',
            name: 'user',
            component: ()=>import('@/views/user/index.vue'),
          },
      ]
    },
  ],
})

export default router
